<template>
  <div class="collection">
     <Header iconColor="#fff" background="rgba(0, 0, 0, 0)"/>
    <div class="image">
        <van-image :src="require('../../assets/img/info.png')" />
    </div>
    <div class="content">
      <div class="desc p8">
        <div class="collect">
           <p class="ddd">绶带琼枝明黄折扇</p>
           <van-image class="avtarNum" :src="require('../../assets/img/bianz.png')" />
        </div>
      </div>
      <div class="comp p8">
        <div class="tit ddd">收藏者</div>
        <div class="name ddd">秋水共长天一色#0986</div>
      </div>
      <div class="comp p8">
        <div class="tit ddd">创作方</div>
        <div class="name ddd">元宇宙国际拍卖有限公司</div>
      </div>
      <div class="comp p8">
        <div class="tit ddd">收藏时间</div>
        <div class="name ddd">2022-02-22 22:22:22</div>
      </div>
      <div class="comp p8">
        <div class="tit ddd">哈希值</div>
        <div class="name ddd">ewe8yt8yr38uurut9ireuieu23eruiuriuu2</div>
      </div>
    </div>

    <van-action-sheet class="fanModel" v-model="show" title="请输入您要转赠的手机号" cancel-text="取消" round @cancel="toCancel">
      <div class="content">
        <van-field type="number" v-model="newphone" label="转赠手机号" placeholder="请输入手机号"></van-field>
        <div class="val-cell">
          <van-button class="logout" block type="info" @click="sure">确定</van-button>
        </div>
      </div>
    </van-action-sheet>

    <van-overlay :show="showModel" @click="showModel = false" class="showModel">
      <div class="wrapper" @click.stop>
        <div class="block">
          <van-image :src="require('../../assets/img/info.png')" />
          <div class="mdDesc">
            <div class="name">绶带琼枝明黄折扇</div>
            <p>发现非凡的数字藏品，就在某某数字藏品</p>
            <div class="ewm"></div>
          </div>
          <van-button class="save" block type="info" @click="save">保存相册</van-button>
          <div class="close" @click="showModel = false">
            <van-icon name="cross" />
          </div>
        </div>
      </div>
    </van-overlay>

    <div class="fixedBtm">
      <van-row>
          <van-col span="6" @click="click1">
            <i class="iconfont icon-tupianshangchuan"></i>
            <span>炫耀</span>
          </van-col>
          <van-col span="6" @click="click2">
            <i class="iconfont icon-gift"></i>
            <span>赠送</span>
          </van-col>
          <van-col span="6" @click="click3">
             <i class="iconfont icon-yunxiazai"></i>
            <span>使用</span>
          </van-col>
          <van-col span="6" @click="click4">
             <i class="iconfont icon-w_zhengshu"></i>
            <span>证书</span>
          </van-col>
      </van-row>
    </div>
  </div>
</template>

<script>
import { mapGetters, mapActions } from 'vuex'
export default {
  name: 'collection',
  computed: { ...mapGetters({ pageData: 'pageData'}) },
  data () {
    return {
        msg: '',
        showModel: false,
        show: false,
        actions: [
           {
             name: '生成海报',type: 1
            },
            {
              name: '分享好友',type: 2
            },
        ]
    }
  },
  methods: {
    sure() {

    },
    click1() {
      this.showModel = true
    },
    click2() {
      this.show = true;
    },
    click3() {

    },
    click4() {

    },
    save() {
      this.showModel = false
    },
    subClick() {
      this.$router.push({name: 'placeOrder'})
    },
    alertMenu(){
      this.show = true;
    },
    onSelect(item){
      console.log(item);
    },
    toCancel(){
      console.log('点击了取消');
    }
  },
  mounted() {
    
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="less" scope>
.collection {
    width: 100%;
    padding-bottom: 20px;
    box-sizing: border-box;
    .image {
      width: 100%;
      height: 310px;
      background-color: pink;
      .van-image {
        width: 100%;
        height: 100%;
      }
    }
    .content {
      width: 100%;
      padding: 8px;
      padding-top: 0;
      padding-bottom: 55px;
      box-sizing: border-box;
      .desc {
        width: 238px;
        margin: 0 auto;
        position: relative;
        background: #F9FBFC;
        box-shadow: 0px 1px 5px 0px rgba(0, 0, 0, 0.1);
        border-radius: 8px;
        padding: 8px;
        box-sizing: border-box;
        margin-top: -34px;
        margin-bottom: 10px;
        .collect {
          width: 100%;
          height: 100%;
          background: #fff;
          border-radius: 8px;
          padding: 4px;
          box-sizing: border-box;
        }
        p {
          text-align: center;
          line-height: 1;
          padding: 4px 0;
          box-sizing: border-box;
          font-size: 17px;
          font-family: PingFangSC-Medium, PingFang SC;
          font-weight: 500;
          color: #333333;
        }
           .avtarNum {
            display: block;
            margin: 0 auto;
            width: 116px;
            height: 24px;
          }
        .valueTab {
          margin-left: 4px;
        }
       .label {
          span{
            display: inline-block;
            padding: 0 8px;
            box-sizing: border-box;
            color: #FFFFFF;
            line-height: 17.5px;
            font-family: PingFangSC-Regular, PingFang SC;
            font-weight: 400;
          }
          .tit {
            background-color: #958CE7;
            border-radius: 4px;
            font-size: 11px;
          }
        }
      }
      .comp {
        height: 64px;
        background: #FFFFFF;
        box-shadow: 0px 1px 5px 0px rgba(0, 0, 0, 0.1);
        border-radius: 8px;
        box-sizing: border-box;
        margin-bottom: 10px;
        .tit {
          font-size: 12px;
          font-family: PingFangSC-Regular, PingFang SC;
          font-weight: 400;
          color: #666666;
          line-height: 1;
          padding: 12px 0 8px 0;
        }
        .name {
          font-size: 15px;
          font-family: PingFangSC-Regular, PingFang SC;
          font-weight: 500;
          color: #333333;
        }
      }
      .story {
        width: 100%;
        height: 600px;
        background: #FFFFFF;
        box-shadow: 0px 1px 5px 0px rgba(0, 0, 0, 0.1);
        border-radius: 8px;
        margin-bottom: 10px;
        box-sizing: border-box;
        .name {
          display: block;
          line-height: 1;
          padding-top: 12px;
          padding-bottom: 12px;
          font-size: 15px;
          font-family: PingFangSC-Regular, PingFang SC;
          font-weight: 500;
          color: #333333;
        }
        .storyImg {
          width: 100%;
          height: 540px;
          background-color: pink;
          border-radius: 8px;
        }
      }
      .purchase {
        width: 100%;
        height: 140px;
        background: #FFFFFF;
        box-shadow: 0px 1px 5px 0px rgba(0, 0, 0, 0.1);
        border-radius: 8px;
        margin-bottom: 10px;
        box-sizing: border-box;
        .name {
          display: block;
          line-height: 1;
          padding-top: 12px;
          padding-bottom: 12px;
          font-size: 15px;
          font-family: PingFangSC-Regular, PingFang SC;
          font-weight: 500;
          color: #333333;
        }
        p {
          font-size: 11px;
          font-family: PingFangSC-Regular, PingFang SC;
          font-weight: 400;
          color: #999999;
          line-height: 18px;
        }
      }
    }
    .fixedBtm {
      padding: 0 8px;
      height: 60px;
      line-height: 60px;
      text-align: center;
      .iconfont {
        color: #333333;
        margin-right: 1px;
        font-size: 17px;
        vertical-align: middle;
      }
      span {
        font-size: 14px;
        color: #333333;
        vertical-align: middle;
        font-family: PingFangSC-Medium, PingFang SC;
        font-weight: 500;
      }
    }
  .fanModel {
    .van-action-sheet__close {
      display: none;
    }
    .van-action-sheet__header {
      font-size: 14px;
      font-family: PingFangSC-Regular, PingFang SC;
      font-weight: 400;
      color: #666666;
    }
    .content {
      padding: 0;
    }
    .val-cell {
      display: block;
      height: 46px;
      line-height: 46px;
      .van-button {
        background-color: transparent;
        border: none;
        color: #333333;
      }

    }
      button {
        display: block;
        font-size: 15px;
        font-family: PingFangSC-Regular, PingFang SC;
        font-weight: 400;
        color: #333333;
        text-align: center;
      }
  }
}

.showModel {
  z-index: 999;
  .wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
  }

  .block {
    position: relative;
    width: 288px;
    height: 360px;
    background-color: #fff;
    border-radius: 10px;
    box-sizing: border-box;
    .close {
      width: 50px;
      height: 50px;
      position: absolute;
      top: -50px;
      right: 0;
      .van-icon {
        color: #fff;
        font-size: 20px;
        margin-top: 16px;
        margin-left: 22px;
      }
    }
    .van-image {
      width: 100%;
      height: 280px;
      border-radius: 10px 10px 0 0;
      overflow: hidden;
    }
    .save.van-button--info {
      width: 200px;
      height: 38px;
      bottom: -70px;
      left: 50%;
      margin-left: -100px;
      position: absolute;
      background: rgba(0, 0, 0, 0);
      border-radius: 20px;
      border: 1px solid #FFFFFF;
    }
    .mdDesc {
        height: 70px;
        position: relative;
        padding: 0 8px;
        box-sizing: border-box;
        .name {
        display: block;
        line-height: 1;
        padding-top: 16px;
        padding-bottom: 12px;
        font-size: 15px;
        font-family: PingFangSC-Regular, PingFang SC;
        font-weight: 500;
        color: #333333;
      }
      p {
        font-size: 11px;
        font-family: PingFangSC-Regular, PingFang SC;
        font-weight: 400;
        color: #999999;
        line-height: 18px;
      }
      .ewm {
        position: absolute;
        top: 0;
        right: 4px;
        width: 70px;
        height: 70px;
        background: #958CE7;
      }
    }
  }
}
</style>
